package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Friend;
import cn.wolfcode.trip.base.domain.Travel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FriendMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Friend record);

    Friend selectByPrimaryKey(Long id);

    List<Friend> selectAll();

    int updateByPrimaryKey(Friend record);

    Friend selectByUserIdAndFriendId(Friend friend);

    List<Friend> getFriendByGroupId(Long groupId);

    void updataGroupByFriendAndUser(@Param("groupId") Long groupId, @Param("friendId") Long friendId, @Param("userId") Long userId);

    void deleteByUserAndFriend(@Param("friendId") Long friendId, @Param("userId") Long userId);
}